package com.yanftch.stopcoding.common.util

import com.intellij.notification.Notification
import com.intellij.notification.NotificationType
import com.intellij.notification.Notifications
import com.intellij.openapi.application.ApplicationManager

object NotificationUtils {

    private const val NOTIFICATION_GROUP_ID = "StopCodingNotifications"

    /**
     * 显示右下角的提示信息
     * @param title 提示标题
     * @param message 提示内容
     */
    @JvmStatic
    fun showNotification(title: String, message: String) {
        ApplicationManager.getApplication().invokeLater {
            val notification = Notification(NOTIFICATION_GROUP_ID, title, message, NotificationType.INFORMATION)
            Notifications.Bus.notify(notification)
        }
    }
}

